.class Lcom/waiqin365/lightapp/im/adapter/ck;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/view/View$OnLongClickListener;


# instance fields
.field final synthetic a:Lcom/hyphenate/chat/EMMessage$ChatType;

.field final synthetic b:Lcom/hyphenate/chat/EMMessage;

.field final synthetic c:Lcom/waiqin365/lightapp/im/adapter/bk;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/im/adapter/bk;Lcom/hyphenate/chat/EMMessage$ChatType;Lcom/hyphenate/chat/EMMessage;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/adapter/ck;->c:Lcom/waiqin365/lightapp/im/adapter/bk;

    iput-object p2, p0, Lcom/waiqin365/lightapp/im/adapter/ck;->a:Lcom/hyphenate/chat/EMMessage$ChatType;

    iput-object p3, p0, Lcom/waiqin365/lightapp/im/adapter/ck;->b:Lcom/hyphenate/chat/EMMessage;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onLongClick(Landroid/view/View;)Z
    .locals 4

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/ck;->a:Lcom/hyphenate/chat/EMMessage$ChatType;

    sget-object v1, Lcom/hyphenate/chat/EMMessage$ChatType;->GroupChat:Lcom/hyphenate/chat/EMMessage$ChatType;

    if-ne v0, v1, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/adapter/ck;->b:Lcom/hyphenate/chat/EMMessage;

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMMessage;->getFrom()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/utils/e;->a(Ljava/lang/String;)Ljava/lang/String;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/adapter/ck;->c:Lcom/waiqin365/lightapp/im/adapter/bk;

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/adapter/bk;->b(Lcom/waiqin365/lightapp/im/adapter/bk;)Landroid/content/Context;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/im/utils/e;->a(Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, "@"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    sget-object v1, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->b:Lcom/waiqin365/lightapp/im/widget/PasteEditText;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/im/widget/PasteEditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    sget-object v1, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->b:Lcom/waiqin365/lightapp/im/widget/PasteEditText;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v3, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->b:Lcom/waiqin365/lightapp/im/widget/PasteEditText;

    invoke-virtual {v3}, Lcom/waiqin365/lightapp/im/widget/PasteEditText;->getText()Landroid/text/Editable;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v2, " "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Lcom/waiqin365/lightapp/im/widget/PasteEditText;->setText(Ljava/lang/CharSequence;)V

    sget-object v0, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->b:Lcom/waiqin365/lightapp/im/widget/PasteEditText;

    sget-object v1, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->b:Lcom/waiqin365/lightapp/im/widget/PasteEditText;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/im/widget/PasteEditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-interface {v1}, Landroid/text/Editable;->length()I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/im/widget/PasteEditText;->setSelection(I)V

    :cond_0
    const/4 v0, 0x1

    return v0
.end method
